<template>
	首页
	<h1>{{$store.state.isLogin?"已登录":"未登录"}}</h1>
	<p>欢迎光临{{$store.state.username}}</p>
	<p>token{{$store.state.token}}</p>
	
	<h1>msg:{{msg}}</h1>
</template>

<script>
	import axios from 'axios'
	
	export default {
		data(){
			return {
				username:"admin",
				password:"123456",
				msg:""
			}
		},
		created(){
			console.log("created");
			axios({
				url:"http://localhost:8080/api/test9",
				method:"get",
				headers:{
					token: this.$store.state.token
				}
			}).then(result=>{
				this.msg = result.data.data;
				console.log(result.data.data);
			})
		}
	}
	
	
</script>

	
<style>
</style>